from typing import List


class Solution:
    def divingBoard(self, shorter: int, longer: int, k: int) -> List[int]:
        if k <= 0:
            return []
        mm = set()
        for i in range(k+1):
            mm.add(shorter*i + longer*(k-i))
        ans = list(mm)
        ans.sort()
        return ans


solve = Solution()

questions = [
    (1, 2, 3),
]

for qi, q in enumerate(questions, 1):
    print(f'#{qi}:', q)
    ss, ll, kk = q
    print(f'ans:', solve.divingBoard(ss, ll, kk))

